package com.bsj.power.common.util;

import java.io.PrintWriter;
import java.io.StringWriter;

public class ExceptionUtil {

	/**
	 * 
	* @Title: getStackStr
	* @Description: 得到异常的栈信息
	* @param @param throwable
	* @param @return
	* @return String    返回类型 
	* @throws
	 */
	public static String getStackStr(Throwable throwable) {
		StringWriter buffer = new StringWriter();
		PrintWriter out = new PrintWriter(buffer);
		throwable.printStackTrace(out);
		out.flush();
		String result = buffer.toString();
		return result;
	}
}
